<div bsModal #orderDetailModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="orderDetailModal" aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog modal-lg" *ngIf="orderDetail">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" (click)="close()" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                <h4 class="modal-title">
                    <span>订单详情</span>
                </h4>
            </div>
            <div class="modal-body">
                <div class="panel panel-default">
                    <div class="panel-heading">商品信息</div>
                    <table class="table table-bordered table-condensed">
                        <thead>
                            <tr>
                                <th>序号</th>
                                <th>商品名称</th>
                                <th>商品所属</th>
                                <th>商品分类</th>
                                <th>出厂价</th>
                                <th>店长价</th>
                                <th>数量</th>
                                <th>成交总价</th>
                                <th>店长收益</th>
                                <th>帮惠收益</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>1</td>
                                <td>{{orderDetail.orderItem.productName}}</td>
                                <td>{{orderDetail.orderItem.productType}}</td>
                                <td>{{orderDetail.orderItem.categoryName}}</td>
                                <td>{{orderDetail.orderItem.priceOfTheTime}}</td>
                                <td>{{orderDetail.orderItem.agentPriceOfTheTime}}</td>
                                <td>{{orderDetail.orderItem.count}}</td>
                                <td>{{orderDetail.orderItem.priceOfTheTime}}</td>
                                <td>{{orderDetail.orderItem.agentProfit}}</td>
                                <td>{{orderDetail.orderItem.systemProfit}}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">订单信息</div>
                    <table class="table table-bordered table-condensed">
                        <thead>
                            <tr>
                                <th>订单号</th>
                                <th>下单时间</th>
                                <th>售出人</th>
                                <th>售出人团队</th>
                                <th>购买人</th>
                                <th>订单状态</th>
                                <th>支付方式</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>{{orderDetail.id}}</td>
                                <td>{{orderDetail.orderTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
                                <td>{{orderDetail.agentName}}</td>
                                <td>{{orderDetail.agentLeader}}</td>
                                <td>{{orderDetail.userName}}</td>
                                <td>{{orderDetail.isPayed?"已支付":"未支付"}}</td>
                                <td>{{orderDetail.paymentMethod}}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">收货人信息</div>
                    <table class="table table-bordered table-condensed">
                        <thead>
                            <tr>
                                <th>收货人姓名</th>
                                <th>收货人电话</th>
                                <th>发货状态</th>
                                <th>快递单号</th>
                                <th>收货人地址</th>
                                <th>退货快递单号</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>{{orderDetail.userAddress?.contacterName}}</td>
                                <td>{{orderDetail.userAddress?.contactPhone}}</td>
                                <td>{{orderDetail.userAddress?.isDelivered?"已发货":"未发货"}}</td>
                                <td></td>
                                <td>{{orderDetail.userAddress?.address}}</td>
                                <td></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button [disabled]="saving" type="button" class="btn btn-default btn-sm" (click)="close()">取消</button>
            </div>
        </div>
    </div>
</div>